#ifndef __IO_H
#define __IO_H

#include "fsl_common.h"

#define GPIO_INPUT_CONFIG (IOMUXC_SW_PAD_CTL_PAD_SRE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_DSE(4) |   \
                           IOMUXC_SW_PAD_CTL_PAD_SPEED(2) | \
                           IOMUXC_SW_PAD_CTL_PAD_ODE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PKE(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUE(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUS(2) |   \
                           IOMUXC_SW_PAD_CTL_PAD_HYS(1))

#define GPIO_OUTPUT_CONFIG (IOMUXC_SW_PAD_CTL_PAD_SRE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_DSE(4) |   \
                           IOMUXC_SW_PAD_CTL_PAD_SPEED(1) | \
                           IOMUXC_SW_PAD_CTL_PAD_ODE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PKE(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUE(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUS(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_HYS(0))

#define GPIO_ADC_CONFIG    (IOMUXC_SW_PAD_CTL_PAD_SRE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_DSE(4) |   \
                           IOMUXC_SW_PAD_CTL_PAD_SPEED(2) | \
                           IOMUXC_SW_PAD_CTL_PAD_ODE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PKE(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUE(1) |   \
                           IOMUXC_SW_PAD_CTL_PAD_PUS(0) |   \
                           IOMUXC_SW_PAD_CTL_PAD_HYS(0))





void ioInit(void);

void ioCheck(void);
uint32_t ioState(uint32_t inputNum);
uint32_t ioPressed(uint32_t inputNum);
uint32_t ioJump(uint32_t inputNum);

/******************************************************************************
 * @brief 静音控制
 * @param enableMute 0:关闭静音，1:开启静音
******************************************************************************/
void ioMuteCtrl(uint32_t enableMute);


void ioRelayBypassCtrl(uint32_t enableBypass);


#endif
